package principle.liskov;

public class Liskov1 {
}

class A1 {
    public int fn1(int num1, int num2) {
        return num1 + num2;
    }

    public int fn2(int num1, int num2) {
        return num1 / num2;
    }
}

class B1 extends A1{
    // B1中重写了A1的几乎所有方法
    @Override
    public int fn1(int num1, int num2) {
        return num1 - num2;
    }

    @Override
    public int fn2(int num1, int num2) {
        return num1 * num2;
    }
}
